package com.lagou.demo02;

import java.util.HashMap;
import java.util.Map;

public class Homework1 {


    public static void main(String[] args) {
        int[] arr = {3,4,6,9,2,1,7};
        System.out.println(solution(arr));;
    }

    public static String solution(int[] arr){
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < arr.length; i++) {
            if(map.get(arr[i])==null){
                map.put(arr[i],1);
            }else{
                return "NO";
            }
        }
        return "YES";
    }



}
